﻿<%@ Page Title="Frequently Asked Questions | Hardwares-R-Us" Language="C#" MasterPageFile="~/Main.master"
    AutoEventWireup="true" Theme="Normal_User_Theme" CodeBehind="FAQ.aspx.cs" Inherits="WDTAsg2.FAQ" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        FAQ</h1>
    <p>
        <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
        <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="Search" />
    </p>
    <p>
        <asp:Label ID="Label3" runat="server" Text="Search Results for "></asp:Label>
        <asp:Label ID="searchSTR" runat="server"></asp:Label>
    </p>
    <br />
    <asp:ListView ID="lvFAQ" runat="server">
        <LayoutTemplate>
            <table runat="server" clientidmode="Static" id="tblFAQ">
                <tr id="Tr1" runat="server">
                    <th id="Th2" runat="server">
                        Short
                    </th>
                    <th id="Th3" runat="server">
                        Long
                    </th>
                    <th id="Th5" runat="server">
                        Answer
                    </th>
                </tr>
                <tr runat="server" id="itemPlaceholder" />
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr runat="server">
                <td id="Td1" runat="server">
                    <%-- Data-bound content. --%>
                    <asp:Label ID="NameLabel" runat="server" Text='<%#Eval("QuestionShort") %>' />
                </td>
                <td id="Td2" runat="server">
                    <p>
                        <%-- Data-bound content. --%>
                        <asp:Label ID="Label1" runat="server" Text='<%#Eval("QuestionLong") %>' />
                    </p>
                </td>
                <td clientidmode="Static" id="answer" runat="server">
                    <p>
                        <%-- Data-bound content. --%>
                        <asp:Label ID="Label2" runat="server" Text='<%#Eval("Answer") %>' />
                    </p>
                </td>
            </tr>
        </ItemTemplate>
        <EmptyDataTemplate>
            <p>
                No results returned
            </p>
        </EmptyDataTemplate>
    </asp:ListView>
</asp:Content>
